<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'student-form',
	'enableAjaxValidation'=>false,
	// 'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

<p class="help-block">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'full_name',array('class'=>'span5','maxlength'=>100)); ?>

	<?php echo $form->textFieldRow($model,'nickname',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->datepickerRow($model,'birthday',
								array(
					                'options' => array(
					                    'language' => 'id',
					                    'format' => 'yyyy/mm/dd' , 'weekStart'=> 1
					                ), 
					            ),
					            array(
					                'prepend' => '<i class="icon-calendar"></i>'
					            )
			);; ?>

	<?php echo $form->textFieldRow($model,'birthplace',array('class'=>'span5','maxlength'=>100)); ?>

	<?php echo $form->textFieldRow($model,'address',array('class'=>'span5','maxlength'=>300)); ?>

	<?php echo $form->textFieldRow($model,'child',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'sibling',array('class'=>'span5')); ?>

	<?php // echo $form->textFieldRow($model,'religion_id',array('class'=>'span5')); ?>

	<?php 
		//echo $form->textFieldRow($model,'flag',array('class'=>'span5','maxlength'=>9)); 
		echo $form->labelEx($model,'religion_id'); 
		echo $form->dropDownList($model, 'religion_id', array('' => '') + CHtml::listData(Religion::model()->findAll(),'id','name'));
		echo $form->error($model,'religion_id');
	?>

	<?php //echo $form->textFieldRow($model,'blood_type',array('class'=>'span5','maxlength'=>2)); ?>

	<?php 
		echo $form->labelEx($model,'blood_type'); 
		echo $form->dropDownList($model, 'blood_type', array('' => '') + array("A" => "A", "B" => "B", "AB" => "AB", "O" => "O"));
		echo $form->error($model,'blood_type');
	?>

	<?php // echo $form->textFieldRow($model,'sex',array('class'=>'span5','maxlength'=>6)); ?>

	<?php 
		echo $form->labelEx($model,'sex'); 
		echo $form->dropDownList($model, 'sex', array('' => '') + array("MALE" => "MALE", "FEMALE" => "FEMALE"));
		echo $form->error($model,'sex');
	?>

	<?php echo $form->textFieldRow($model,'student_number',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->fileFieldRow($model,'photo'); ?>

	<?php echo $form->textFieldRow($model,'created_by',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'modified_by',array('class'=>'span5')); ?>



<div class="form-actions">
	<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
</div>

<?php $this->endWidget(); ?>
